package com.jbp.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Data
@TableName("lottery")
public class Lottery implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableField(exist = false)
	private Map<String,Integer> typeMap = new ConcurrentHashMap<>();

	public Lottery() {
		typeMap.put("one",1);
		typeMap.put("five",5);
		typeMap.put("ten",10);
		typeMap.put("hundred",100);
	}

	@TableId
	private Integer id;

	private Integer lotteryRecordId;

	private Integer giftId;

	/**
	 * 礼品价值
	 */
	private Integer giftNum;

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;
}
